<?php

$config = [
    'components' => [
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => 'Ge_Dp1U1MR0Fqs6x-yhDypbZUvd2FVgb',
        ],
		'mailer' => [  
	        'class' => 'yii\swiftmailer\Mailer',  
		    'useFileTransport' =>false,//这句一定有，false发送邮件，true只是生成邮件在runtime文件夹下，不发邮件
	        'transport' => [  
		        'class' => 'Swift_SmtpTransport',  
		        'host' => 'smtp.163.com',  //每种邮箱的host配置不一样
		        'username' => 'bweducation_online@163.com',  
		        'password' => 'ifwanppfqdlenykn',  
		        'port' => '25',  
		        'encryption' => 'tls',  
				],   
	        'messageConfig'=>[  
		        'charset'=>'UTF-8',  
		        'from'=>['bweducation_online@163.com'=>'admin']  
		    ],  
		],  
    ],
];

if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
    ];
}

return $config;
